<template>
  <a-layout id="components-layout-demo-custom-trigger">
    <a-layout-sider v-model="collapsed" :trigger="null" collapsible>
      <div class="logoDiv">
        <a class="logo" href="#"></a>
      </div>
      <div style="height: 64px;">
        <span>
          <img class="img-circle" src="../../../assets/imgs/touxiang.jpg" />
        </span>
      </div>
      <div>
        <span class="logo-name">ALLAN</span>
      </div>
      <div>
        <span class="logo-name">超级管理员</span>
      </div>
      <a-menu
        theme="dark"
        mode="inline"
        :defaultSelectedKeys="['1']"
        v-model="valueKey"
      >
        <a-menu-item key="1">
          <a-icon type="user" />
          <span>首页</span>
        </a-menu-item>
        <a-menu-item key="2">
          <a-icon type="video-camera" />
          <span>数据接入</span>
        </a-menu-item>
        <a-menu-item key="3">
          <a-icon type="upload" />
          <span>数据加工</span>
        </a-menu-item>
        <a-menu-item key="4">
          <a-icon type="upload" />
          <span>报表制作</span>
        </a-menu-item>
        <a-menu-item key="5">
          <a-icon type="upload" />
          <span>我的报表</span>
        </a-menu-item>
        <a-menu-item key="6">
          <a-icon type="upload" />
          <span>团队报表</span>
        </a-menu-item>
      </a-menu>
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="padding: 0">
        <div>
          <a-icon
            style="color:beige;"
            class="trigger"
            :type="collapsed ? 'menu-unfold' : 'menu-fold'"
            @click="() => (collapsed = !collapsed)"
          />
        </div>

        <div style="width: 100%;">
          <div style="float:right;margin-right: 20px;">
            <a style="margin-right: 10px;color: #ffffff;" href="#">团队中心</a>
            <a style="color: #ffffff;" href="/">注销</a>
          </div>
        </div>
      </a-layout-header>
      <a-layout-content
        :style="{
          background: '#f3f3f4',
          minHeight: '280px',
          overflowY: 'auto'
        }"
      >
        <DEHome v-if="valueKey[0] === '1'"></DEHome>
        <DataProcessing v-if="valueKey[0] === '3'"></DataProcessing>
        <DataAccess v-if="valueKey[0] === '2'"></DataAccess>
      </a-layout-content>
    </a-layout>
  </a-layout>
</template>
<script>
import DataProcessing from './DataProcessing'
import DEHome from './DEHome'
import DataAccess from './DataAccess'
export default {
  components: {
    DEHome,
    DataProcessing,
    DataAccess
  },
  data() {
    return {
      collapsed: false,
      valueKey: ['1']
    }
  },
  methods: {}
}
</script>
<style lang="less" scoped>
.ant-layout-header {
  display: flex;
  background-color: #001529 !important;
}
.ant-layout {
  height: 100%;
}
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: #1890ff;
}

#components-layout-demo-custom-trigger .logoDiv {
  height: 70px;
  margin: 10px;
  display: flex;
}

#components-layout-demo-custom-trigger .logo {
  background-image: url(../../../assets/imgs/logo1.png);
  width: 200px;
  height: 50px;
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-background-size: 165px auto;
  -moz-background-size: 165px auto;
  -o-background-size: 165px auto;
  background-size: 165px auto;
}
.img-circle {
  border-radius: 50%;
  vertical-align: middle;
  border: 0;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  /* float: left; */
  margin-left: 5px;
}
.logo-name {
  color: antiquewhite;
  /* float: left; */
  margin: 5px;
}
</style>
